import { reactive } from "vue";

export default function useData() {
  const pageData = reactive({
    columnData: [
      {
        label: "序号",
        prop: "0",
        width: "80px",
        sortable: true
      },
      {
        label: "MAC",
        prop: "2",
        width: "auto"
      },
      {
        label: "攻击IP",
        prop: "3",
        width: "150"
      },
      {
        label: "攻击次数",
        prop: "4",
        width: "100"
      },
      {
        label: "攻击类型",
        prop: "5",
        width: "100"
      },
      {
        label: "等级",
        prop: "6",
        width: "100"
      },
      {
        label: "最后告警时间",
        prop: "7",
        width: "160"
      },


      {
        label: "状态",
        prop: "8",
        width: "auto"
      },
      {
        label: "封堵时间",
        prop: "9",
        width: "180"
      },
      {
        label: "封堵方式",
        prop: "10",
        width: "100"
      },
      {
        label: "操作",
        prop: "operation",
        width: "160",
        // fixed: "right",
      }
    ]
  });
  const agrMap = new Map([
    ["0", "所有"],
    ["6", "TCP"],
    ["17", "UDP"],
    ["1", "ICMP"],
  ]);
  return {
    pageData,
    agrMap
  };
}
